<div id="content">
    <div class="_blank" style="height:20px"></div>
    <div id="home-stream">
        <?php foreach ($frontpage->result() as $f):?>
        <div class="home-column">
            <div class="home-row">
                <?php if(strlen(trim($f->link1))>0):?>
                <a href="<?php echo $f->link1;?>" target="_blank">
                <?php endif;?>
                    <div>
                        <img src="<?php echo base_url(); ?>photo/frontpage/<?php echo $f->img1;?>"/>
                    </div>
                    <?php if($f->type==0):?>
                        <?php if(strlen(trim($f->text1))>0):?>
                        <div class="home-caption">
                            <p class="home-caption-title">
                                <?php echo $f->name;?>
                            </p>
                            <p>
                                <?php echo $f->text1;?>
                            </p>
                        </div>
                        <?php endif;?>
                    <?php endif;?>
                <?php if(strlen(trim($f->link1))>0):?>
                </a>
                <?php endif;?>
            </div>
            <?php if($f->type>=1):?>
            <div class="home-row">
                <?php if(strlen(trim($f->link2))>0):?>
                <a href="<?php echo $f->link2;?>" target="_blank">
                <?php endif;?>
                    <img src="<?php echo base_url(); ?>photo/frontpage/<?php echo $f->img2;?>"/>
                <?php if(strlen(trim($f->link2))>0):?>
                </a>
                <?php endif;?>
            </div>
            <?php endif;?>
            <?php if ($f->type==2):?>
                <?php if(strlen(trim($f->link3))>0):?>
                <a href="<?php echo $f->link3;?>" target="_blank">
                <?php endif;?>
                    <img src="<?php echo base_url(); ?>photo/frontpage/<?php echo $f->img3;?>"/>
                <?php if(strlen(trim($f->link3))>0):?>
                </a>
                <?php endif;?>
            </div>
            <?php endif;?>
        </div>
        <?php endforeach;?>
        <div id="last-anchor">
        </div>
    </div>
</div>
<div id="home-stream-loading" target="_blank">
    <img src="<?php echo base_url(); ?>images/loading.gif"/>
</div>
<div id="bottom">
    <table>
        <tr>
            <td><img src="<?php echo base_url(); ?>images/bottom-logo.png"/></td> 
            <td style="vertical-align: middle;">
                <span class="link">
                    ABOUT | TERMS & CONDITION | ©2012-2013 website design by SANROK Studio
                </span>
                <br/>
                <span class="link">
                    All designers found here are not comissioned by After Idea
                </span>
            </td> 
        </tr>
    </table>
</div>